package com.cy.pj.common.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class JsonResult {
	
	private Integer state=1;
	private String message="ok";
	private Object data;
	
	/**
	 * 正确信息 
	 */
	public JsonResult(Object data) {
		this.data=data;
	}
	/**
	 * 错误信息 
	 */
	public JsonResult(String message) {
		this.message=message;
	}
	/**
	 * 异常信息 
	 */
	public JsonResult(Throwable e) {
		this.state=0;
		this.message=e.getMessage();
	}
	
}
